package com.zhouchb.xxljobdemo;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * @Create 2023-07-25 13:21
 * @Description
 */
@Service
public class XxlJobServer {
    @XxlJob(value = "printTime")
    public ReturnT<String> printTime(String param) {
        System.out.println(LocalDateTime.now());
        return ReturnT.SUCCESS;
    }

    @XxlJob(value = "haha")
    public ReturnT<String> hah(String param) {
        System.out.println("我要执行了");
        return ReturnT.SUCCESS;
    }
}
